/**
 * 
 */
package com.res.common.properties;

import java.util.Properties;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

/**
 * @author Dhanushka Ariyasingha.
 *
 */
public class SimulatorPropertyHandler {

	@Autowired
	private Properties properties;

	private static SimulatorPropertyHandler handler = null;
	
	private SimulatorPropertyHandler(){
/*		PropertyPlaceholderConfigurer config = (PropertyPlaceholderConfigurer)
				Factory.getFactory().getBean("propertyConfigurer");*/
	}

	public String getPropertyByName(final String propertyName) {
		return properties.getProperty(propertyName);
	}

	public static SimulatorPropertyHandler getInstance() {

		if (null == handler) {
			handler = new SimulatorPropertyHandler();
		}

		return handler;
	}
}
